package com.base.common.web.controller;

import java.util.Enumeration;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import com.base.core.mvc.web.BaseWebController;

/**
 * @author start
 */
@Controller
public class FrameworkController extends BaseWebController {

	@GetMapping("/login")
	public String login() {
		return "redirect:/pp/main-login";
	}
	
	@GetMapping("/logout")
	public String logout() {
		Enumeration<String> names=request.getSession().getAttributeNames();
		while(names.hasMoreElements()) {
			String name=names.nextElement();
			request.getSession().removeAttribute(name);
		}
		return "redirect:/pp/main-login";
	}
	
}
